home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 03 - 1987 / 03.02 Feb 87 / Basic Benchmarks / File I⁄O / Sequential PRINT < prev   
Encoding:
Text File  |  1986-10-27  |  456 b   |  27 lines  |  [TEXT/MSBB]

  1. PRINT "Sequential I/O- PRINT"
  2. PRINT "5000 Iterations"
  3.  
  4. start = TIMER   ' calculate the overhead
  5. FOR i% = 1 TO 5000
  6. NEXT i%
  7. finish = TIMER
  8. overhead = finish - start
  9.  
  10. OPEN "benchmarks:Gregl.dat" FOR OUTPUT AS #1 
  11. x$ = "X"
  12. start = TIMER
  13. FOR i% = 1 TO 5000
  14.     PRINT #1, x$;
  15. NEXT i%
  16.  
  17. finish = TIMER
  18. CLOSE #1
  19.  
  20. PRINT "finish = ";finish
  21. PRINT "start  = ";start
  22. PRINT "Overhead = ";overhead
  23.  
  24. PRINT ((finish - start)-overhead); " seconds"
  25. WHILE INKEY$ = "" : WEND
  26.  
  27.